<?php
namespace User\Model;

use Think\Model;

class OptionModel extends Model
{
    CONST STATUS_ACTIVE = 1;//正常、已发布--
    CONST STATUS_PENDING = 2;//待发布--
    CONST STATUS_STOP = 3;//停用--
    CONST STATUS_DELETE = 9;//已删除--

    public static function get_status($status = 'all')
    {
        $label = [
            self::STATUS_ACTIVE => "正常",
            self::STATUS_PENDING => "待发布",
            self::STATUS_STOP => "停用",
            self::STATUS_DELETE => "已删除",
        ];
        if ($status === 'all') {
            return $label;
        }
        if (array_key_exists($status, $label)) {
            return $label[$status];
        }
        return "未知";
    }

    CONST OPTION_LEVEL_STAFF = 0;//---员工--
    CONST OPTION_LEVEL_LEADER = 1;//--领导---
}

?>